
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lily
 * Date: 2024-09-29
 * Time: 8:04
 */
public class test_1 {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        int num = 0;
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            String str = in.next();
            char[] chars = new char[str.length() + 2];
            for (int i = 1; i < chars.length - 1; i++) {
                chars[i] = str.charAt(i - 1);
            }
            chars[0] = 'a';
            chars[chars.length - 1] = 'z';
            int left = -1;
            String ret = " ";
            for (int right = 0; right < chars.length - 1; right++) {
                int ch = chars[right + 1] - '0';
                if (ch >= 0 && ch < 10 && chars[right] - '0' > 10) {
                    left = right;

                } else if (chars[right] - '0' < 10 && chars[right] - '0' > 0 && ch > 10) {

                    if (num < right - left) {
                        num = right - left;
                        ret = str.substring(left, right);
                    }
                }
            }
            System.out.println(num);
            System.out.println(ret);
        }
    }
}
